import { Mask, SpinLoading } from "antd-mobile";

export default function Loading({loading,children}:{loading:boolean,children:React.ReactNode}){
    return(
        <>
            <Mask visible={loading} color='white'>
                <div style={{height:'100vh',display:'flex', flexDirection:'column', alignItems:'center',justifyContent:'center',gap:10}}>
                    <div>
                        <SpinLoading />
                    </div>
                    <div style={{color:'var(--adm-color-primary)'}}>加载中，请稍等</div>
                </div>
            </Mask>
            {children}
        </>
    )
}